using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using FrameOperateSync;

public class AGameUnityClient : UnitySyncClient
{
    protected override void Start()
    {
        if (!HelperUtility.SinglePlayerMode)
        {
            var networkClient = gameObject.GetComponent<NetworkClient>();
            networkClient.StartNetwork();
            ClientUtility.StartSync(networkClient, this, a => { a?.Invoke(); });
        }
        else
        {
            ClientUtility.StartSync(null, this, a => { a?.Invoke(); });
            GameObject.Destroy(gameObject.GetComponent<NetworkClient>());
        }
    }
}
